package com.gitee.yannzh.rune.dao.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author yann
 * @date 2019/12/19
 * @description: PO基类
 */
@Setter
public abstract class BaseAutoKeyEntity<T extends BaseAuditEntity<T, K, Long>, K extends Serializable> extends BaseAuditEntity<T, K, Long> {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private K id;

    @Override
    public K getId() {
        return id;
    }
}
